<script setup>
  import {ref, watch} from'vue'
  let qs=ref("")
  let ayy=['滚',"sb",'死',]
  let ansay=ref("")
  watch(ansay,(nv,ov)=>{
     ayy.forEach(item=>{
          if(nv.indexOf(item)>-1){
             ansay.value=ansay.value.repeat(" ")
          }
     })
    })

</script>

<template>
        <input type="text" v-model="qs">
        <span>{{ ansay }}</span>
</template>
<style scoped> 
</style>